package com.sinopec.yelofixedreader.stock.inn.resultcontract

import android.os.Parcelable
import com.sinopec.basemodule.model.StockInListModel
import com.sinopec.basemodule.resultcontract.GetSetFromIntent
import com.sinopec.basemodule.resultcontract.SetAndGetValueResultContract
import com.sinopec.basemodule.utils.ARouterManagerUtils
import com.sinopec.basemodule.utils.kotlin.navigationClass
import kotlinx.android.parcel.Parcelize


/**
 * 入库的启动契约
 */
class RFIDIn {

    companion object : SetAndGetValueResultContract<Params, Result>(
        Request.from(GetSetFromIntent.Parcelables()),
        Response.from(GetSetFromIntent.Parcelables()),
        ARouterManagerUtils.GOTO_IN_STOCK_IN_RFID_ACTIVITY.navigationClass
    )

    /**
     * 参数
     */
    @Parcelize
    data class Params(
        val params: StockInListModel,
    ) : Parcelable

    @Parcelize
    data class Result(
        /**
         * 操作结果
         */
        var codeResult: String = "",
    ) : Parcelable {

        companion object {
            const val CODE_FINISH_AND_OPEN_DETAIL = "CODE_FINISH_AND_OPEN_DETAIL"
        }
    }
}